//
//  S2Tab1.m
//  Lesson2
//
//  Created by Alexander Trifonov on 20.04.12.
//  Copyright (c) 2012 fgengine@gmail.com. All rights reserved.
//

#import "L2Tab1.h"

@implementation L2Tab1

- (IBAction) execute:(id)sender
{
    result.text = [NSString stringWithFormat:
                   format.text,
                   param_1.text,
                   param_2.text,
                   param_3.text,
                   nil];
}

- (BOOL) textFieldShouldReturn:(UITextField *)textField
{
    [textField resignFirstResponder];
    return YES;
}

- (IBAction)closeInput:(UIButton *)sender
{
    [format resignFirstResponder];
    [param_1 resignFirstResponder];
    [param_2 resignFirstResponder];
    [param_3 resignFirstResponder];
    [result resignFirstResponder];
}

- (void)dealloc {
    [format release];
    [param_1 release];
    [param_2 release];
    [param_3 release];
    [result release];
    [super dealloc];
}

- (void)viewDidUnload {
    [format release];
    format = nil;
    [param_1 release];
    param_1 = nil;
    [param_2 release];
    param_2 = nil;
    [param_3 release];
    param_3 = nil;
    [result release];
    result = nil;
    [super viewDidUnload];
}
@end
